Tests if a numeric or string expression can be converted to a Date variable.
数値ないし文字列表式が 日付 変数に変換できるかを判定します。
IsDate (Expression)
IsDate (Expression)
Bool
ブール型
Expression: Any numeric or string expression that you want to test. If the expression can be converted to a date, the function returns True, otherwise the function returns False.
Expression: 評価する数値ないし文字列表式。この関数は、与えられた表式が日付データに変換できる場合に True を返し、それ以外の場合は False を返します。
Sub ExampleIsDate
Sub ExampleIsDate
Dim sDateVar as String
Dim sDateVar as String
sDateVar = "12.12.1997"
sDateVar = "1997.12.12"
print IsDate(sDateVar) REM Returns True
print IsDate(sDateVar) REM 戻り値は True
sDateVar = "12121997"
sDateVar = "19971212"
print IsDate(sDateVar) REM Returns False
print IsDate(sDateVar) REM 戻り値は False
end sub
end sub